From ef7c5747c4b49c8763ebc891896561334329bae0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sat, 10 Oct 2020 08:43:52 +0200 Subject: [PATCH] build: Only add -Wcast-align for gcc Either we or clang needs to get its shit together about this warning. But using it during development with clang just makes actually usable warnings get lost in a flood of -Wcast-align warnings. --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 40f31f9f3c..ce6b962f4c 100644 --- a/meson.build +++ b/meson.build @@ -250,7 +250,6 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' '-Wno-c++11-extensions', '-Wno-missing-include-dirs', '-Wno-typedef-redefinition', - '-Wcast-align', '-Wduplicated-branches', '-Wduplicated-cond', '-Wformat=2', @@ -294,6 +293,10 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' '-Werror=vla', '-Werror=write-strings', ] + + if cc.get_id() == 'gcc' + test_cflags += ['-Wcast-align'] # This warns too much on clang + endif else test_cflags = [] endif -- 2.30.2